package com.iniyo.ai.poetry;

import com.iniyo.ai.poetry.api.AipCreation;
import org.json.JSONObject;

public class PoetryTest {
    //设置APPID/AK/SK
    public static final String APP_ID = "23509972";
    public static final String API_KEY = "zdtlSwmDtjvFyiZtG47RrGhF";
    public static final String SECRET_KEY = "RdmDhupgOG7h2Ysze3clqU4dRc1eVfPG";

    public static void main(String[] args) {
        poetry();
    }

    /**
     * 诗词
     */
    private static void poetry() {
        // 初始化一个AipNlp
        AipCreation client = new AipCreation(APP_ID, API_KEY, SECRET_KEY);

        // 新闻摘要接口
        JSONObject res = client.couplets("新年曦", 0);
        System.out.println(res.toString());
    }
}
